import { defHttp } from '/@/utils/http/axios';
import { ContentTypeEnum } from '/@/enums/httpEnum';

enum Api {
  getcustomersList = '/admin-api/system/customers/page',
  getcustomersAdd = '/admin-api/system/customers/create',
  getcustomersEdit = '/admin-api/system/customers/update',
  getcustomersDelete = '/admin-api/system/customers/delete',
}

/**
 * @description: 获用户
 */
export const customersList = (params: any) => {
  return defHttp.get<any>({ url: Api.getcustomersList, params });
};
export const addcustomers = (params: any) => {
  return defHttp.post<any>({ url: Api.getcustomersAdd, params });
};
export const editcustomers = (params: any) => {
  return defHttp.put<any>({ url: Api.getcustomersEdit, params });
};
export const deletecustomers = (params: any) => {
  return defHttp.delete<any>({
    url: Api.getcustomersDelete,
    params,
    headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
  });
};
